<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<!-- page title -->
<title>Nu Skin Enterprises (Singapore) Pte Ltd Registration Software</title>


<link rel="stylesheet" href="../css/core.css" type="text/css" />


<script type="text/javascript">

function searchForm() {
	var distID = document.getElementById('distID').value;
	var name = document.getElementById('name').value;
	var ajaxRequest = new XMLHttpRequest();
	ajaxRequest.open('GET', "searchDistributor.php?func=search&distID="+distID+"&name="+name, true);
	ajaxRequest.onreadystatechange = function() {
		if (ajaxRequest.readyState==4){
			 document.getElementById("searchResult").innerHTML=ajaxRequest.responseText;
		}
	}
	ajaxRequest.send(null);
}//end searchForm()

function viewDetails(distID) {
	window.open("searchDistributor.php?func=viewDetails&distID="+distID,'Distributor Details','width=300,height=100');
}


</script>
</head>
<body>
<div id="wrapper">

	<div id="sitename" class="clear">
    	<!-- YOUR SITE NAME -->
		<h1><a href="#">Nu Skin Singapore</a></h1>
	</div>
	
	<div id="navbar">	
		<div class="clear">
			<ul class="sf-menu clear">
            	<!-- PAGE NAVIGATION -->
				<li class="selected"><a href="index.html"><span>Collection</span></a></li>
               	<li><a href="upload.html"><span>Upload</span></a></li>
				<li><a href="file.php"><span>Download</span></a></li>
			</ul>
		</div>
	</div>
	
	
	<div id="body-wrapper">
	
    	<!-- BREADCRUMB NAVIGATION -->
		<div class="bcnav">
			<div class="bcnav-left">
				<div class="bcnav-right clear">
					<h3>you are here: <u>Collection</u></h3>
				</div>
			</div>
		</div>
		
		<div id="body" class="clear">
			<div class="clear">
				<div class="column">
					 <fieldset>
                        <legend>Search Distributor</legend>
                        <form action="" method="get">
                            <p><label for="name">Distributor ID:</label>
                            <input name="distID" id="distID" value="" type="text" size="35"/></p>
        
                            <p><label for="name">Name:</label>
                            <input name="name" id="name" value="" type="text" size="35"/></p>
                            <p><input class="formbutton" value="Search" type="button" onclick="searchForm()" /></p>
                        
                        </form>
        
                    </fieldset>
                    <fieldset>
        				<legend>Search Results</legend>
                        <br></br>           
                        <div id="searchResult"></div>
                   </fieldset>
            	</div>
			</div>
		</div>
	</div>
	
	<div id="footer">
		<p>&copy; 2011. Developed by Yan Zhang</a></p>
	</div>

</div>
</body>
</html>
